<template>
  <div>
    <el-card>
      <el-breadcrumb separator="/">
        <el-breadcrumb-item>公众</el-breadcrumb-item>
        <el-breadcrumb-item>课程信息</el-breadcrumb-item>
        <el-breadcrumb-item>课程基本信息</el-breadcrumb-item>
      </el-breadcrumb>
      <div id = "pdfDom">

        <center>
          <table border="1" cellspacing="0" class="tableInfo" :model="editForm" id="printTest">
            <thead></thead>
            <tbody>
            <tr>
              <th>课程学分</th>
              <td>{{editForm.points}}</td>
            </tr>
            <tr>
              <th>课程学时</th>
              <td>{{editForm.period}}</td>
            </tr>
            <tr>
              <th>理论学时</th>
              <td>{{editForm.theory}}</td>
            </tr>
            <tr>
              <th>实验学时</th>
              <td>{{editForm.practice}}</td>
            </tr>
            <tr>
              <th>周课时</th>
              <td>{{editForm.weeklytime}}</td>
            </tr>
            <tr>
              <th>总目标</th>
              <td>{{editForm.totalgoal}}</td>
            </tr>
            <tr>
              <th>课程描述</th>
              <td>{{editForm.coursedes}}</td>
            </tr>
            <tr>
              <th>教学方式</th>
              <td>{{editForm.ways}}</td>
            </tr>
            <tr>
              <th>考核方式</th>
              <td>{{editForm.tests}}</td>
            </tr>
            </tbody>
          </table>
        </center>
      </div>

    </el-card>
  </div>
</template>


<script>
  export default {

    created(){
      this.getall();
    },
    data() {
      return {
        fileName: this.$session.get('coursename') + '课程基础内容信息',
        List:[],
        total:0,
        addDialogVisible:false,
        editDialogVisible:false,
        infoDialogVisible:false,

        editForm:{
          courseid:this.$session.get('bulls'),
          points:'',
          period:'',
          theory:'',
          practice:'',
          weeklytime:'',
          totalgoal:'',
          coursedes:'',
          ways:'',
          tests:'',
        },
        editFormRules: {


        },




      }
    },


    methods: {
      exports () {
        this.getPdf('pdfDom', this.fileName)
      },

      async getall(){
        const {data:res} = await this.$http.get("Publics/CourseDetail?courseid="+this.$session.get("bulls"));
        this.editForm = res;
      },

      async editParagraphs(){
        const {data:res} = await this.$http.get("Publics/CourseDetail?courseid="+this.$session.get("bulls"));
        this.editForm = res;
        this.editDialogVisible = true;
      },

      addDialogClose () {
        this.$refs.addFormRef.resetFields();
      },
      editDialogClose () {
        this.$refs.editFormRef.resetFields();
      },
      ret(){
        this.$router.push({ path: "../manageCourse"});
      },

    }
  }
</script>




<style scoped>
  .el-header{
    background: lightslategray;
    color: white;
    font-size: 25px;
    align-items: center;
    justify-content: space-between;
    display: flex;
  }
  .el-main{
    background-color: whitesmoke;
  }

  table.tableInfo{
    border: 1px;
    font-family: verdana,arial,sans-serif;
    font-size:11px;
    color:#808080;
    border-width: 1px;
    border-color: #666666;
    border-collapse: collapse;

  }

  .tableInfo th{
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #EBEEF5;;
    width: 150px;
    background-color: #808080;
    color: white;
    font-size: 14px;
  }

  .tableInfo td{
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #EBEEF5;
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center;
    width: 600px;
    font-size: 14px;
  }
</style>
